import React from "react";
import DatePicker from "./DatePicker";
import YearPicker from "./YearPicker";
import MonthPicker from "./MonthPicker";
import TimePicker from "./TimePicker";
import WeekPicker from "./WeekPicker";
import QuarterPicker from "./QuarterPicker";
import RangePicker from "./RangePicker";
import {
  DatePickerIcon,
  DatePickerMonthLeftArrow,
  DatePickerMonthRightArrow,
  DatePickerYearLeftArrow,
  DatePickerYearRightArrow,
} from "../Svg";

// type
import { Moment } from "moment";
import {
  PickerProps,
  PickerDateProps,
  RangePickerProps as BaseRangePickerProps,
} from "../../antd/date-picker/generatePicker";

export const commonProps = {
  suffixIcon: <DatePickerIcon />,
  prevIcon: <DatePickerMonthLeftArrow />,
  nextIcon: <DatePickerMonthRightArrow />,
  superPrevIcon: <DatePickerYearLeftArrow />,
  superNextIcon: <DatePickerYearRightArrow />,
};

DatePicker.YearPicker = YearPicker;
DatePicker.MonthPicker = MonthPicker;
DatePicker.TimePicker = TimePicker;
DatePicker.WeekPicker = WeekPicker;
DatePicker.QuarterPicker = QuarterPicker;
DatePicker.RangePicker = RangePicker;

export type AntdDatePickerProps = PickerProps<Moment>;
export type AntdMonthPickerProps = Omit<PickerDateProps<Moment>, "picker">;
export type AntdWeekPickerProps = Omit<PickerDateProps<Moment>, "picker">;
export type AntdYearPickerProps = Omit<PickerDateProps<Moment>, "picker">;
export type AntdTimePickerProps = Omit<PickerDateProps<Moment>, "picker">;
export type AntdQuarterPickerProps = Omit<PickerDateProps<Moment>, "picker">;
export type AntdRangePickerProps = BaseRangePickerProps<Moment>;

export type { Props as DatePickerProps } from "./DatePicker";
export default DatePicker;
